fix: skip registry sync when a specific package is requested#22
fix: skip registry sync when a specific package is requested#22yashas-hm wants to merge 1 commit into
Conversation
|
I believe this is the intended behavior, because registries may contain skills for specific packages, they are cloned and scanned for any skills matching the given package. In the next version, you will have the ability to remove/add your own registries, so if you just don't want them at all you will be able to opt out. |
Hi @jakemac53 & @marcelomendoncasoares, I noticed there are differing views on the expected behavior, and I want to make sure this PR aligns with the maintainers' intent before moving forward. The original issue reports that registries (e.g. the flutter and serverpod repos) are cloned even when running Could you help clarify the intended behavior?
Happy to adjust the approach once the expected behavior is confirmed. Thanks! |
Summary
skills get <package>no longer clones or updates git registry repositories as a side-effect. Registry sync now only runs for an unfilteredskills get.Details
Previously,
RegistrySync.sync()was called unconditionally, cloning all configured registries (e.g. the Flutter and Serverpod repos) into.dart_tool/skills/repos/even when the user ranskills get jaspr. The registry skills were correctly filtered after cloning, but the cloning itself always happened, polluting the workspace with unrelated repos.The fix guards the sync call behind
if (packageNames == null), matching the intended semantics: a bareskills get(no args) fetches everything;skills get <package>only installs skills for that specific package without touching unrelated registries.Test plan
when installing a specific package then registries are not clonedverifies that a configured global registry is not cloned whenskills get dep_pkgis run anddep_pkghas its own Dart skills.when git is unavailable,when installing from global registry) continue to pass.dart test).Closes #5
Fixes #5